Color interpolation method and device

ABSTRACT

A color interpolation method and device are disclosed. The color interpolation method includes (a) extracting a pixel value only from a Bayer pattern image regardless of R, G and B values and computing edge directional information; (b) determining a condition of the edge directional information, computed in the step of (a), among a plurality of predetermined conditions, each of the plurality of predetermined conditions corresponding to a color interpolation parameter computing algorithm; and (c) computing a color interpolation parameter based on the color interpolation parameter computing algorithm corresponding to the condition of the edge directional information, determined in the step of (b). With the present invention, wrong color can be prevented from being generated in the vicinity of minute edge having 700 or more, and zipper-shaped artifact can be prevented from being generated in the vicinity of edge.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims foreign priority benefits under 35 U.S.C. .sctn.119(a)-(d) to PCT/KR2007/002611, filed May 30, 2007, which is herebyincorporated by reference in its entirety.

BACKGROUND

1. Technical Field

The present invention relates to a color interpolation device, morespecifically to a color interpolation method and device that can improveimage quality through color interpolation.

2. Description of the Related Art

Recent development of multimedia apparatuses has allowed complex imagesto be processed.

FIG. 1 is a block diagram illustrating a conventional colorinterpolation process.

As illustrated in FIG. 1, in accordance with a conventional colorinterpolation processing operation, RGB data, interpolated in a colorinterpolation unit 100, passes through a camera signal processing(hereinafter, referred to as “CSP”) intermediate processing unit 102.Then, the RGB data is converted into luminance (Y) data and chrominance(C) data in an RGB converting unit 104. Behind a video processingsystem, the converted Y data and C data pass through a noise removingunit 106 and undergo an edge enhancing process in an edge enhancing unit108.

In the conventional color interpolation, an effective interpolation wasusually used.

FIG. 2 illustrates a resolution chart video recovered by a conventionaleffective interpolation method.

Referring to FIG. 2, in accordance with the conventional, typicaleffective interpolation method, wrong color is generated in the vicinityof minute edge having 700 or more, and zipper-shaped artifacts aregenerated around the edge.

SUMMARY

As described above, the present invention, which is contrived to solvethe aforementioned problems, provides a color interpolation method and adevice that perform color interpolation by using edge directionalinformation.

The present invention provides a color interpolation method and a devicethat can prevent wrong color from being generated in the vicinity ofminute edge.

The present invention provides a color interpolation method and a devicethat can prevent zipper-shaped artifacts from being generated around theedge when a color interpolation process is performed.

Other problems that the present invention solves will become moreapparent through the following description.

To solve the above problems, an aspect of the present invention featuresa color interpolation method.

According to an embodiment of the present invention, a colorinterpolation method can include (a) extracting a pixel value only froma Bayer pattern image regardless of R, G and B values and computing edgedirectional information; (b) determining a condition of the edgedirectional information, computed in the step of (a), among a pluralityof predetermined conditions, each of the plurality of predeterminedconditions corresponding to a color interpolation parameter computingalgorithm; and (c) computing a color interpolation parameter based onthe color interpolation parameter computing algorithm corresponding tothe condition of the edge directional information, determined in thestep of (b).

The edge directional information can include edge vertical directionalinformation and edge horizontal directional information.

Delta_V1 and delta_V2 are computed by the following formulas,respectively, and

${{delta\_ V}\; 1} = \frac{\left( {{{{P\; 5} - {P\; 1}}} + {{{P\; 5} - {P\; 9}}}} \right)}{2}$${{delta\_ V}\; 2} = \frac{\left( {{{{P\; 2} - {P\; 7}}} + {{{P\; 3} - {P\; 8}}}} \right)}{2}$

the vertical directional information V_comp is computed by the followingformula using the delta_V1 and delta_V2, the P1, P2, P3, P5, P8 and P9being pixel values in a Bayer pattern image regardless of R, G and Bcomponents:

V_comp=delta_(—) V1+delta_(—) V2

Delta_H1 and delta_H2 are computed by the following formulas,respectively, and

${{delta\_ H}\; 1} = \frac{\left( {{{{P\; 5} - {P\; 4}}} + {{{P\; 5} - {P\; 6}}}} \right)}{2}$${{delta\_ H}\; 2} = \frac{\left( {{{{P\; 2} - {P\; 3}}} + {{{P\; 7} - {P\; 8}}}} \right)}{2}$

the vertical directional information H_comp is computed by the followingformula using the delta_H1 and delta_H2, the P1, P2, P3, P5, P8 and P9being pixel values in a Bayer pattern image regardless of R, G and Bcomponents:

H_comp=delta_(—) H1+delta_(—) H2

The plurality of predetermined conditions can include a first condition,in which the vertical directional information is larger than a firstthreshold and the horizontal directional information is larger than asecond threshold; a second condition, in which the vertical directionalinformation is larger than the horizontal directional information; and athird condition, satisfying neither the first condition nor the secondcondition.

If the computed edge directional information satisfies the firstcondition and an R component is a center pixel in an RG line of theBayer pattern image, parameters Gwn, Gws, Ges, Gen and Gout are computedby the following formulas in the step of (c):

${Gwn} = \frac{\left( {{G\; 1} + {G\; 3} + {G\; 6} + {G\; 4}} \right)}{4}$${Gws} = \frac{\left( {{G\; 6} + {G\; 8} + {G\; 11} + {G\; 9}} \right)}{4}$${Ges} = \frac{\left( {{G\; 7} + {G\; 9} + {G\; 12} + {G\; 10}} \right)}{4}$${Gen} = \frac{\left( {{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}} \right)}{4}$${Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 1} + {{Kr}\; 2} + {{Kr}\; 3} + {{Kr}\; 4}} \right)}{4}}$

If the computed edge directional information satisfies the firstcondition and a G component is a center pixel in an GB line of the Bayerpattern image, parameters Gn, Gw, Gs and Ge are computed by thefollowing formulas in the step of (c):

${Gn} = \frac{\left( {{G\; 1} + {G\; 2} + {G\; 5} + {G\; 3}} \right)}{4}$${Gw} = \frac{\left( {{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}} \right)}{4}$${Gs} = \frac{\left( {{G\; 5} + {G\; 7} + {G\; 9} + {G\; 8}} \right)}{4}$${Ge} = \frac{\left( {{G\; 3} + {G\; 5} + {G\; 8} + {G\; 6}} \right)}{4}$

if the computed edge directional information satisfies the secondcondition and an R component is a center pixel in an RG line of theBayer pattern image, parameters Gwn, Gws, Ges, Gen and Gout are computedby the following formulas in the step of (c):

${Gwn} = \frac{\left( {{G\; 3} + {G\; 4}} \right)}{2}$${Gws} = \frac{\left( {{G\; 8} + {G\; 9}} \right)}{2}$${Ges} = \frac{\left( {{G\; 9} + {G\; 10}} \right)}{2}$${Gen} = \frac{\left( {{G\; 4} + {G\; 5}} \right)}{2}$${Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 2} + {{Kr}\; 4}} \right)}{2}}$

If the computed edge directional information satisfies the secondcondition and a G component is a center pixel in an GB line of the Bayerpattern image, parameters Gn, Gw, Gs and Ge are computed by thefollowing formulas in the step of (c):

${Gn} = \frac{\left( {{G\; 2} + {G\; 3}} \right)}{2}$${Gw} = \frac{\left( {{G\; 4} + {G\; 5}} \right)}{2}$${Gs} = \frac{\left( {{G\; 7} + {G\; 8}} \right)}{2}$${Ge} = \frac{\left( {{G\; 5} + {G\; 6}} \right)}{2}$

If the computed edge directional information satisfies the thirdcondition and an R component is a center pixel in an RG line of theBayer pattern image, parameters Gwn, Gws, Ges, Gen and Gout are computedby the following formulas in the step of (c):

${Gwn} = \frac{\left( {{G\; 1} + {G\; 6}} \right)}{2}$${Gws} = \frac{\left( {{G\; 6} + {G\; 11}} \right)}{2}$${Ges} = \frac{\left( {{G\; 7} + {G\; 12}} \right)}{2}$${Gen} = \frac{\left( {{G\; 2} + {G\; 7}} \right)}{2}$${Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 1} + {{Kr}\; 3}} \right)}{2}}$

If the computed edge directional information satisfies the thirdcondition and an G component is a center pixel in an GB line of theBayer pattern image, parameters Gn, Gw, Gs and Ge are computed by thefollowing formulas in the step of (c):

${Gn} = \frac{\left( {{G\; 1} + {G\; 5}} \right)}{2}$${Gw} = \frac{\left( {{G\; 2} + {G\; 7}} \right)}{2}$${G\; s} = \frac{\left( {{G\; 5} + {G\; 9}} \right)}{2}$${Ge} = \frac{\left( {{G\; 3} + {G\; 8}} \right)}{2}$

To solve the above problems, an aspect of the present invention featuresa color interpolation device.

According to an embodiment of the present invention, a colorinterpolation device can include an edge directional informationcomputing unit, extracting a pixel value only from a Bayer pattern imageregardless of R, G and B values and computing edge directionalinformation; an edge directional information condition determining unit,determining a condition of the edge directional information, outputtedfrom the edge directional information computing unit, among a pluralityof predetermined conditions, each of the plurality of predeterminedconditions corresponding to a color interpolation parameter computingalgorithm; and a parameter computing unit, computing a colorinterpolation parameter based on the color interpolation parametercomputing algorithm corresponding to the condition of the edgedirectional information, determined by the edge directional informationcondition determining unit.

The edge directional information computing unit can include the edgedirectional information computing unit comprises a horizontaldirectional information computing unit, computing edge horizontaldirectional information, and a vertical directional informationcomputing unit, computing edge vertical directional information.

Delta_V1 and delta_V2 are computed by the following formulas,respectively, and

${{delta\_ V}\; 1} = \frac{\left( {{{{P\; 5} - {P\; 1}}} + {{{P\; 5} - {P\; 9}}}} \right)}{2}$${{delta\_ V}\; 2} = \frac{\left( {{{{P\; 2} - {P\; 7}}} + {{{P\; 3} - {P\; 8}}}} \right)}{2}$

the vertical directional information V_comp is computed by the followingformula using the delta_V1 and delta_V2, the P1, P2, P3, P5, P8 and P9being pixel values in a Bayer pattern image regardless of R, G and Bcomponents:

V_comp=delta_(—) V1+delta_(—) V2

Delta_H1 and delta_H2 are computed by the following formulas,respectively, and

${{delta\_ H}\; 1} = \frac{\left( {{{{P\; 5} - {P\; 4}}} + {{{P\; 5} - {P\; 6}}}} \right)}{2}$${{delta\_ H}\; 2} = \frac{\left( {{{{P\; 2} - {P\; 3}}} + {{{P\; 7} - {P\; 8}}}} \right)}{2}$

the vertical directional information H_comp is computed by the followingformula using the delta_H1 and delta_H2, the P1, P2, P3, P5, P8 and P9being pixel values in a Bayer pattern image regardless of R, G and Bcomponents:

H_comp=delta_(—) H1+delta_(—) H2

The plurality of predetermined conditions can include the plurality ofpredetermined conditions can includes a first condition, in which thevertical directional information is larger than a first threshold andthe horizontal directional information is larger than a secondthreshold; a second condition, in which the vertical directionalinformation is larger than the horizontal directional information; and athird condition, satisfying neither the first condition nor the secondcondition, and the parameter computing unit can includes a firstcondition parameter computing unit computing a parameter based on acolor interpolation parameter computing algorithm relating to the firstcondition; a second condition parameter computing unit, computing aparameter based on a color interpolation parameter computing algorithmrelating to the second condition; and a third condition parametercomputing unit, computing a parameter based on a color interpolationparameter computing algorithm relating to the third condition.

If the computed edge directional information satisfies the firstcondition and an R component is a center pixel in an RG line of theBayer pattern image, parameters Gwn, Gws, Ges, Gen and Gout are computedby the following formulas in the step of (c):

${Gwn} = \frac{\left( {{G\; 1} + {G\; 3} + {G\; 6} + {G\; 4}} \right)}{4}$${Gws} = \frac{\left( {{G\; 6} + {G\; 8} + {G\; 11} + {G\; 9}} \right)}{4}$${Ges} = \frac{\left( {{G\; 7} + {G\; 9} + {G\; 12} + {G\; 10}} \right)}{4}$${Gen} = \frac{\left( {{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}} \right)}{4}$${Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 1} + {{Kr}\; 2} + {{Kr}\; 3} + {{Kr}\; 4}} \right)}{4}}$

If the computed edge directional information satisfies the firstcondition and a G component is a center pixel in an GB line of the Bayerpattern image, parameters Gn, Gw, Gs and Ge are computed by thefollowing formulas in the step of (c):

${Gn} = \frac{\left( {{G\; 1} + {G\; 2} + {G\; 5} + {G\; 3}} \right)}{4}$${Gw} = \frac{\left( {{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}} \right)}{4}$${Gs} = \frac{\left( {{G\; 5} + {G\; 7} + {G\; 9} + {G\; 8}} \right)}{4}$${Ge} = \frac{\left( {{G\; 3} + {G\; 5} + {G\; 8} + {G\; 6}} \right)}{4}$

If the computed edge directional information satisfies the secondcondition and an R component is a center pixel in an RG line of theBayer pattern image, parameters Gwn, Gws, Ges, Gen and Gout are computedby the following formulas in the step of (c):

${Gwn} = \frac{\left( {{G\; 3} + {G\; 4}} \right)}{2}$${Gws} = \frac{\left( {{G\; 8} + {G\; 9}} \right)}{2}$${Ges} = \frac{\left( {{G\; 9} + {G\; 10}} \right)}{2}$${Gen} = \frac{\left( {{G\; 4} + {G\; 5}} \right)}{2}$${Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 2} + {{Kr}\; 4}} \right)}{2}}$

If the computed edge directional information satisfies the secondcondition and a G component is a center pixel in an GB line of the Bayerpattern image, parameters Gn, Gw, Gs and Ge are computed by thefollowing formulas in the step of (c):

${Gn} = \frac{\left( {{G\; 2} + {G\; 3}} \right)}{2}$${Gw} = \frac{\left( {{G\; 4} + {G\; 5}} \right)}{2}$${Gs} = \frac{\left( {{G\; 7} + {G\; 8}} \right)}{2}$${Ge} = \frac{\left( {{G\; 5} + {G\; 6}} \right)}{2}$

if the computed edge directional information satisfies the thirdcondition and an R component is a center pixel in an RG line of theBayer pattern image, parameters Gwn, Gws, Ges, Gen and Gout are computedby the following formulas in the step of (c):

${Gwn} = \frac{\left( {{G\; 1} + {G\; 6}} \right)}{2}$${Gws} = \frac{\left( {{G\; 6} + {G\; 11}} \right)}{2}$${Ges} = \frac{\left( {{G\; 7} + {G\; 12}} \right)}{2}$${Gen} = \frac{\left( {{G\; 2} + {G\; 7}} \right)}{2}$${Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 1} + {{Kr}\; 3}} \right)}{2}}$

The computed edge directional information satisfies the third conditionand an G component is a center pixel in an GB line of the Bayer patternimage, parameters Gn, Gw, Gs and Ge are computed by the followingformulas in the step of (c):

${Gn} = \frac{\left( {{G\; 1} + {G\; 5}} \right)}{2}$${Gw} = \frac{\left( {{G\; 2} + {G\; 7}} \right)}{2}$${Gs} = \frac{\left( {{G\; 5} + {G\; 9}} \right)}{2}$${Ge} = \frac{\left( {{G\; 3} + {G\; 8}} \right)}{2}$

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating a conventional colorinterpolation process;

FIG. 2 illustrates a resolution chart video recovered by a conventionaleffective interpolation method;

FIG. 3 illustrates a case of an R component R3 in an RG line among Bayerpattern images, inputted in a color interpolation process, being acenter pixel;

FIG. 4 illustrates a Bayer pattern image in case that G5 in a GB line isa center pixel;

FIG. 5 illustrates the structure of a color interpolation device inaccordance with an embodiment of the present invention;

FIG. 6 is an example illustrating a 5×5 mask written with only pixelvalues regardless of a pixel component in a Bayer matrix;

FIG. 7 is a flow chart illustrating a general flow of a colorinterpolation method using edge directional information in accordancewith an embodiment of the present invention; and

FIG. 8 illustrates a resolution chart image in the case of being appliedwith a color interpolation method in accordance with the presentinvention.

DETAILED DESCRIPTION

The above objects, features and advantages will become more apparentthrough the below description with reference to the accompanyingdrawings.

Since there can be a variety of permutations and embodiments of thepresent invention, certain embodiments will be illustrated and describedwith reference to the accompanying drawings. This, however, is by nomeans to restrict the present invention to certain embodiments, andshall be construed as including all permutations, equivalents andsubstitutes covered by the spirit and scope of the present invention.Throughout the drawings, similar elements are given similar referencenumerals. Throughout the description of the present invention, whendescribing a certain technology is determined to evade the point of thepresent invention, the pertinent detailed description will be omitted.

Terms such as “first” and “second” can be used in describing variouselements, but the above elements shall not be restricted to the aboveterms. The above terms are used only to distinguish one element from theother. For instance, the first element can be named the second element,and vice versa, without departing the scope of claims of the presentinvention. The term “and/or” shall include the combination of aplurality of listed items or any of the plurality of listed items.

When one element is described as being “connected” or “accessed” toanother element, it shall be construed as being connected or accessed tothe other element directly but also as possibly having another elementin between. On the other hand, if one element is described as being“directly connected” or “directly accessed” to another element, it shallbe construed that there is no other element in between.

The terms used in the description are intended to describe certainembodiments only, and shall by no means restrict the present invention.Unless clearly used otherwise, expressions in the singular numberinclude a plural meaning. In the present description, an expression suchas “comprising” or “consisting of” is intended to designate acharacteristic, a number, a step, an operation, an element, a part orcombinations thereof, and shall not be construed to preclude anypresence or possibility of one or more other characteristics, numbers,steps, operations, elements, parts or combinations thereof.

Unless otherwise defined, all terms, including technical terms andscientific terms, used herein have the same meaning as how they aregenerally understood by those of ordinary skill in the art to which theinvention pertains. Any term that is defined in a general dictionaryshall be construed to have the same meaning in the context of therelevant art, and, unless otherwise defined explicitly, shall not beinterpreted to have an idealistic or excessively formalistic meaning.

Hereinafter, some embodiments of the present invention will be describedin detail with reference to the accompany drawings.

Before describing the present invention, an effective interpolationmethod as a typical color interpolation method will be firstlydescribed.

The color interpolation for an inputted 5×5 Bayer pattern image isperformed.

FIG. 3 illustrates a case of an R component R3 in an RG line among Bayerpattern images, inputted in a color interpolation process, being acenter pixel.

Described first will be a typical interpolation method of a case inwhich R3 is a center pixel, as illustrated in FIG. 3.

Parameters Rn, Rw, Rs and Re and Kr1, Kr2, Kr3 and Kr4 are computed incase that an R component is a center pixel in a Bayer pattern.

The parameters Rn, Rw, Rs and Re are computed by the following Formula1.

$\begin{matrix}{{{Rn} = \frac{{R\; 1} + {R\; 3}}{2}}{{Rw} = \frac{{R\; 2} + {R\; 3}}{2}}{{Rs} = \frac{{R\; 3} + {R\; 5}}{2}}{{Re} = \frac{{R\; 3} + {R\; 4}}{2}}} & \left\lbrack {{Formula}\mspace{14mu} 1} \right\rbrack\end{matrix}$

Also, the parameters Kr1, Kr2, Kr3 and Kr4 are computed by the followingFormula 2.

$\begin{matrix}{{{{Kr}\; 1} = {{G\; 4} - {Rn}}}{{{Kr}\; 2} = {{G\; 6} - {Rw}}}{{{Kr}\; 3} = {{G\; 9} - {Rs}}}{{{Kr}\; 4} = {{G\; 7} - {Re}}}} & \left\lbrack {{Formula}\mspace{14mu} 2} \right\rbrack\end{matrix}$

If the parameters Rn, Rw, Rs and Re and Kr1, Kr2, Kr3 and Kr4 arecomputed by the Formula 1 and Formula 2, respectively, the final outputvalue of a G component can be computed.

Gout, the final output value of the G component, is computed by thefollowing Formula 3.

$\begin{matrix}{{G\; {out}} = {{R\; 3} + \frac{\left( {{{Kr}\; 1} + {{Kr}\; 2} + {{Kr}\; 3} + {{Kr}\; 4}} \right)}{4}}} & \left\lbrack {{Formula}\mspace{14mu} 3} \right\rbrack\end{matrix}$

To evaluate the final output value of an interpolated B component,parameters Gwn, Gws, Ges and Gen and Kb1, Kb2, Kb3 and Kb4 must becomputed.

The parameters Gwn, Gws, Ges and Gen are computed by the followingFormula 4.

$\begin{matrix}{{{Gwn} = \frac{{G\; 1} + {G\; 3} + {G\; 6} + {G\; 4}}{4}}{{Gws} = \frac{{G\; 6} + {G\; 8} + {G\; 11} + {G\; 9}}{4}}{{Ges} = \frac{{G\; 7} + {G\; 9} + {G\; 12} + {G\; 10}}{4}}{{Gen} = \frac{{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}}{4}}} & \left\lbrack {{Formula}\mspace{14mu} 4} \right\rbrack\end{matrix}$

The parameters Kb1, Kb2, Kb3 and Kb4 are also computed by the followingFormula 5.

Kb1=Gwn−B1

Kb1=Gwn−B1

Kb2=Gen−B2

Kb3=Gws−B3

Kb4=Ges−B4  [Formula 5]

If the parameters computed by the Formula 4 and Formula 5 are used, anoutput value of the interpolated B component can be evaluated by thefollowing Formula 6.

$\begin{matrix}{{B\; {out}} = {{G\; {out}} - \frac{\left( {{{Kb}\; 1} + {{Kb}\; 2} + {{Kb}\; 3} + {{Kb}\; 4}} \right)}{4}}} & \left\lbrack {{Formula}\mspace{14mu} 6} \right\rbrack\end{matrix}$

In the meantime, an output value of the interpolated R component isidentical to the R3, a center pixel, as shown in the following Formula7.

Rout=3  [Formula 7]

The case of the R component being the center pixel has been alreadydescribed with reference to FIG. 3. Considering that the R component andthe B component exchange their positions with each other in the Bayerpattern image, the same method can be applied to the case of the centerpixel being the B component in a GB line.

Next, the typical interpolation method in case that G5 is the centerpixel in the GB line will be described.

FIG. 4 illustrates a Bayer pattern image in case that G5 is a centerpixel in a GB line.

In case that the G component is the center pixel in the GB line of theBayer pattern, parameters Gn, Gw, Gs and Ge and Kr1, Kr2, Kb1 and Kb2are computed.

The parameters Gn, Gw, Gs and Ge are computed by the following Formula8.

$\begin{matrix}{{{Gn} = \frac{\left( {{G\; 1} + {G\; 2} + {G\; 5} + {G\; 3}} \right)}{4}}{{Gw} = \frac{\left( {{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}} \right)}{4}}{{Gs} = \frac{\left( {{G\; 5} + {G\; 7} + {G\; 9} + {G\; 8}} \right)}{4}}{{Ge} = \frac{\left( {{G\; 3} + {G\; 5} + {G\; 8} + {G\; 6}} \right)}{4}}} & \left\lbrack {{Formula}\mspace{14mu} 8} \right\rbrack\end{matrix}$

The parameters Kr1, Kr2, Kb1 and Kb2 are also computed by the followingFormula 9.

Kr1=Gn−R1

Kr2=Gs−R2

Kb1=Gw−B1

Kb2=Ge−B2  [Formula 9]

If the parameters Gn, Gw, Gs and Ge and Kr1, Kr2, Kb1 and Kb2 arecomputed by the Formula 8 and Formula 9, respectively, the interpolatedfinal output value of R, G and B components can be computed.

Gout, the final output value of the G component, is identical to the G5as shown in the following Formula 10.

Gout=G5  [Formula 10]

Rout, the final output value of the R Component, is computed by thefollowing Formula 11.

$\begin{matrix}{{R\; {out}} = {{G\; 5} - \frac{\left( {{{Kr}\; 1} + {{Kr}\; 2}} \right)}{2}}} & \left\lbrack {{Formula}\mspace{14mu} 11} \right\rbrack\end{matrix}$

Finally, Bout, the final output value of the B component, is computed bythe following Formula 12.

$\begin{matrix}{{B\; {out}} = {{G\; 5} - \frac{\left( {{{Kb}\; 1} + {{Kb}\; 2}} \right)}{2}}} & \left\lbrack {{Formula}\mspace{14mu} 12} \right\rbrack\end{matrix}$

The case of the G component being the center pixel in the GB line wasdescribed with reference to FIG. 4. Considering that the R component andthe B component exchange their positions with each other in the Bayerpattern image, the same method can be applied to the case of the Ccomponent being the center pixel in a RG line.

The above description is related to the previously used typicaleffective interpolation. For the reference, since the above formulaswere already well-known through the following publication, any person ofordinary skill in the art shall be able to easily understand the meaningand object of the pertinent formulas although additional description isomitted. (Soo-Chang Pei, Fellow, IEE E, Io-Kuong Tam, Effective ColorInterpolation in CCD Color Filter Arrays Using Signal Correlation, IEEEtransaction on circuits and systems for video technology, Vol. 13(6),June 2003.)

As described above, in accordance with the conventional interpolationmethod, as shown in a resolution chart video of FIG. 2, wrong color isgenerated in the vicinity of minute edge having 700 or more. Besidethat, zipper-shaped artifacts are generated in the vicinity of edge.

To solve these problems, the present invention computes a new parameterof edge directional information and calculates color interpolationparameters by each different method according to the edge directionalinformation.

To compute the edge directional information, a 5×5 mask having a pixelvalue of each component only is used regardless of the R, G and Bcomponents of a Bayer pattern.

FIG. 6 is an example illustrating a 5×5 mask written with pixel valuesonly in a Bayer matrix regardless of a pixel component.

Also, FIG. 5 illustrates the structure of a color interpolation devicein accordance with an embodiment of the present invention.

Referring to FIG. 5, the color interpolation device in accordance withan embodiment of the present invention can include a directionalinformation computing unit 500, a directional information conditiondetermining unit 502, a first condition parameter computing unit 504, asecond condition parameter computing unit 506 and a third conditionparameter computing unit 508. The directional information computing unit500 can include a vertical directional information computing unit 520and a horizontal directional information computing unit 530.

The directional information computing unit 500 computes edge directionalinformation. The edge directional information is extracted by using a5×5 mask value, illustrated in FIG. 5. The vertical directionalinformation computing unit 520 computes edge vertical directionalinformation, and the horizontal directional information computing unit530 computes edge horizontal directional information. The horizontal andvertical directional information is a numerically expressed integer.

In accordance with an embodiment of the present invention, the edgevertical directional information is computed by using the difference invertically disposed pixel values in a 5×5 mask, and the edge horizontaldirectional information is computed by using the difference inhorizontally disposed pixel values in the 5×5 mask.

The more detailed method for computing the vertical directionalinformation and the horizontal directional information will be describedthrough additional drawings.

The directional information condition determining unit 502 determineswhich one of the predetermined conditions the directional information,computed in the directional information computing unit 500, belongs to.

Here, the first condition of the predetermined conditions satisfies thecase of the vertical directional information being larger than a firstthreshold and the horizontal directional information being larger than asecond threshold.

In case that the vertical directional information and the horizontaldirectional information, extracted in the directional informationcomputing unit 500, are satisfied with the first condition, thedirectional information condition determining unit 502 controls thefirst condition parameter computing unit 504 to compute a colorinterpolation parameter.

The second condition of the predetermined conditions satisfies the caseof the vertical directional information being larger than the horizontaldirectional information.

In case that the vertical directional information and the horizontaldirectional information, extracted in the directional informationcomputing unit 500, are satisfied with the second condition, thedirectional information condition determining unit 502 controls thesecond condition parameter computing unit 506 to compute the colorinterpolation parameter.

However, in case that the output value of the directional informationcomputing unit 500 satisfies both the first condition and the secondcondition, the directional information condition determining unit 502controls the first condition parameter computing unit 504 to compute thecolor interpolation parameter

The third condition of the predetermined conditions is related to thecase of the vertical directional information and the horizontaldirectional information satisfying neither the first condition nor thesecond condition. In this case, the directional information conditiondetermining unit 502 controls the third condition parameter computingunit 508 to compute the color interpolation parameter.

The first condition parameter computing unit 504, the second conditionparameter computing unit 506 and the third condition parameter computingunit 508 compute the color interpolation according to a predeterminedcomputing method.

The first condition parameter computing unit 504, the second conditionparameter computing unit 506 and the third condition parameter computingunit 508 compute the color interpolation parameter by distinguishing acase of R3 being the center pixel in the RG line (B is the center pixelin a GE line) and another case of G5 being the center pixel in the GBline (G is the center pixel in the RG line).

The first condition parameter computing unit 504, the second conditionparameter computing unit 506 and the third condition parameter computingunit 508 compute the parameters Gout, Gwn, Gws, Ges and Gen by eachdifferent method in case that R3 is the center pixel in the RG line (Bis the center pixel in a GE line) and compute the parameters Gn, Gw, Gsand Ge by each different method in case that G5 is the center pixel inthe GB line (G is the center pixel in the RG line).

The formulas by which the aforementioned color interpolation parametersare computed according to each different condition will be describedlater in detail.

FIG. 7 is a flow chart illustrating a general flow of a colorinterpolation method using edge directional information in accordancewith an embodiment of the present invention.

To perform color interpolation by using edge directional information,edge vertical directional information is firstly computed in a steprepresented by 700.

To compute the vertical directional information, two parameters delta_V1and delta_V2 are computed. The two parameters delta_V1 and delta_V2 arecomputed by the following Formula 13.

$\begin{matrix}{{{{delta\_ V}\; 1} = \frac{\left( {{{{P\; 5} - {P\; 1}}} + {{{P\; 5} - {P\; 9}}}} \right)}{2}}{{{delta\_ V}\; 2} = \frac{\left( {{{{P\; 2} - {P\; 7}}} + {{{P\; 3} - {P\; 8}}}} \right)}{2}}} & \left\lbrack {{Formula}\mspace{14mu} 13} \right\rbrack\end{matrix}$

As shown in the Formula 13, the parameter delta_V1 is computed by usingthe values of pixels disposed above and below the center pixel, and theparameter delta_V2 is computed by using the values of pixels provided intwo rows adjacent to the center row.

By using the two parameters delta_V1 and delta_V2, computed by Formula13, the vertical directional information, V_comp, is computed by thefollowing Formula 14.

V_comp=delta_(—) V1+delta_(—) V2  [Formula 14]

When it comes to formulas for computing the vertical directionalinformation, the delta_V1 and the delta_V2, the present invention is notlimited to the aforementioned formulas. It shall be also evident to anyperson of ordinary skill in the art that they can be computed in variousways by using the parameters used in the aforementioned Formulas. Forexample, the delta_V1 and the delta_V2 can be divided by another integerinstead of 2. Alternatively, a value that is not divided by 2 can beused.

If the vertical directional information is computed, the horizontaldirectional information is computed in a step represented by 702.

To compute the horizontal directional information, two parametersdelta_H1 and delta_H2 are computed. The two parameters delta_H1 anddelta_H2 are computed by the following Formula 15.

$\begin{matrix}{{{{delta\_ H}\; 1} = \frac{\left( {{{{P\; 5} - {P\; 4}}} + {{{P\; 5} - {P\; 6}}}} \right)}{2}}{{{delta\_ H}\; 2} = \frac{\left( {{{{P\; 2} - {P\; 3}}} + {{{P\; 7} - {P\; 8}}}} \right)}{2}}} & \left\lbrack {{Formula}\mspace{14mu} 15} \right\rbrack\end{matrix}$

As shown in the Formula 15, the parameter delta_H1 is computed by usingthe values of pixels disposed in opposite sides of the center pixel, andthe parameter delta_H2 is computed by using the values of pixels incolumns provided above and below the center column.

By using the two parameters delta_H1 and delta_H2, computed by Formula15, the horizontal directional information, H_comp, is computed by thefollowing Formula 16.

H_comp=delta_(—) H1+delta_(—) H2  [Formula 16]

If the vertical directional information and the horizontal directionalinformation are computed, in a step represented by 704, it is determinedwhether the first condition satisfies the case of the horizontaldirectional information being larger than a first threshold a1 and thehorizontal directional information being larger than a second thresholda2.

In case that the vertical directional information and the horizontaldirectional information satisfy the first condition, and R3 is thecenter pixel in the RG line, the Gwn, Gws, Ges, Gen and Gout arecomputed by Formula 17. By referring to the aforementioned parameter,the Gwn, Gws, Ges, Gen and Gout are computed by the same method as theexisting parameter formula.

$\begin{matrix}{{{Gwn} = \frac{\left( {{G\; 1} + {G\; 3} + {G\; 6} + {G\; 4}} \right)}{4}}{{Gws} = \frac{\left( {{G\; 6} + {G\; 8} + {G\; 11} + {G\; 9}} \right)}{4}}{{Ges} = \frac{\left( {{G\; 7} + {G\; 9} + {G\; 12} + {G\; 10}} \right)}{4}}{{Gen} = \frac{\left( {{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}} \right)}{4}}{{Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 1} + {{Kr}\; 2} + {{Kr}\; 3} + {{Kr}\; 4}} \right)}{4}}}} & \left\lbrack {{Formula}\mspace{14mu} 17} \right\rbrack\end{matrix}$

The identical method can be applied to the case bo B being the centerline in the GB line, considering that the R and B exchange theirpositions with each other.

In case that the vertical directional information and the horizontaldirectional information satisfy the first condition, and G5 is thecenter pixel in the GB line, the Gn, Gw, Gs and Ge are computed byFormula 18.

$\begin{matrix}{{{Gn} = \frac{\left( {{G\; 1} + {G\; 2} + {G\; 5} + {G\; 3}} \right)}{4}}{{Gw} = \frac{\left( {{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}} \right)}{4}}{{Gs} = \frac{\left( {{G\; 5} + {G\; 7} + {G\; 9} + {G\; 8}} \right)}{4}}{{Ge} = \frac{\left( {{G\; 3} + {G\; 5} + {G\; 8} + {G\; 6}} \right)}{4}}} & \left\lbrack {{Formula}\mspace{14mu} 18} \right\rbrack\end{matrix}$

The same method as Formula 18 can be applied to the case of G being thecenter line in the RG line.

In case that the vertical directional information and the horizontaldirectional information do not satisfy the first condition, it isdetermined whether a second condition, in which the vertical directionalinformation is larger than the horizontal directional information, issatisfied in a step represented by 708.

In case that the second condition is satisfied, and R3 is the centerpixel in the RG line, the Gwn, Gws, Ges, Gen and Gout are computed bythe following Formula 19.

$\begin{matrix}{{{Gwn} = \frac{\left( {{G\; 3} + {G\; 4}} \right)}{2}}{{Gws} = \frac{\left( {{G\; 8} + {G\; 9}} \right)}{2}}{{Ges} = \frac{\left( {{G\; 9} + {G\; 10}} \right)}{2}}{{Gen} = \frac{\left( {{G\; 4} + {G\; 5}} \right)}{2}}{{Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 2} + {{Kr}\; 4}} \right)}{2}}}} & \left\lbrack {{Formula}\mspace{14mu} 19} \right\rbrack\end{matrix}$

The identical method can be applied to the case of B being the centerline in the GB line, considering that R and B exchange their positionswith each other.

In case that the vertical directional information and the horizontaldirectional information satisfy the second condition, and G5 is thecenter pixel in the GB line, the Gn, Gw, Gs and Ge are computed byFormula 20.

$\begin{matrix}{{{Gn} = \frac{\left( {{G\; 2} + {G\; 3}} \right)}{2}}{{Gw} = \frac{\left( {{G\; 4} + {G\; 5}} \right)}{2}}{{Gs} = \frac{\left( {{G\; 7} + {G\; 8}} \right)}{2}}{{Ge} = \frac{\left( {{G\; 5} + {G\; 6}} \right)}{2}}} & \left\lbrack {{Formula}\mspace{14mu} 20} \right\rbrack\end{matrix}$

The same method as Formula 20 can be applied to the case of G being thecenter pixel in the RG line.

In case that the vertical directional information and the horizontaldirectional information do not satisfy the first condition and thesecond condition, and R3 is the center pixel in the RG line, the Gwn,Gws, Ges, Gen and Gout are computed by the following Formula 21.

$\begin{matrix}{{{Gwn} = \frac{\left( {{G\; 1} + {G\; 6}} \right)}{2}}{{Gws} = \frac{\left( {{G\; 6} + {G\; 11}} \right)}{2}}{{Ges} = \frac{\left( {{G\; 7} + {G\; 12}} \right)}{2}}{{Gen} = \frac{\left( {{G\; 2} + {G\; 7}} \right)}{2}}{{Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 1} + {{Kr}\; 3}} \right)}{2}}}} & \left\lbrack {{Formula}\mspace{14mu} 21} \right\rbrack\end{matrix}$

The identical method can be applied to the case of B being the centerline in the GB line, considering that the R and B exchange theirpositions with each other.

In case that the vertical directional information and the horizontaldirectional information satisfy the second condition, and Gs is thecenter pixel in the GB line, the Gn, Gw, Gs and Ge are computed byFormula 22.

$\begin{matrix}{{{Gn} = \frac{\left( {{G\; 1} + {G\; 5}} \right)}{2}}{{Gw} = \frac{\left( {{G\; 2} + {G\; 7}} \right)}{2}}{{Gs} = \frac{\left( {{G\; 5} + {G\; 9}} \right)}{2}}{{Ge} = \frac{\left( {{G\; 3} + {G\; 8}} \right)}{2}}} & \left\lbrack {{Formula}\mspace{14mu} 22} \right\rbrack\end{matrix}$

The same method as Formula 22 can be applied to the case of G being thecenter pixel in the RG line.

FIG. 8 illustrates a resolution chart image when a color interpolationmethod is applied in accordance with the present invention.

In the case of FIG. 2, in which the conventional color interpolationmethod is applied, wrong color was generated in the vicinity of minuteedge having 700 or more. Besides, zipper-shaped artifacts were generatedin the vicinity of edge. However, in the case of recovering with thecolor interpolation method of the present invention, most of theoriginal colors are recovered without generating wrong color in thevicinity of minute edge, and the zipper-shaped artifacts are notgenerated. Similar to the existing color interpolation method, it can berecognized that the same quality color is recovered without deformationwhen color video such as a flower image is applied.

As described above, the present invention can prevent wrong color frombeing generated in the vicinity of minute edge and zipper-shapedartifacts from being generated in the vicinity of edge, by using edgedirectional information and computing parameters by each differentalgorithm according to conditions of the edge directional information.

The drawings and detailed description are only examples of the presentinvention, serve only for describing the present invention and by nomeans limit or restrict the spirit and scope of the present invention.Thus, any person of ordinary skill in the art shall understand that alarge number of permutations and other equivalent embodiments arepossible. The true scope of the present invention must be defined onlyby the spirit of the appended claims.

1. A color interpolation method, comprising: (a) extracting a pixelvalue only from a Bayer pattern image regardless of R, G and B valuesand computing edge directional information; (b) determining a conditionof the edge directional information, computed in the step of (a), amonga plurality of predetermined conditions, each of the plurality ofpredetermined conditions corresponding to a color interpolationparameter computing algorithm; and (c) computing a color interpolationparameter based on the color interpolation parameter computing algorithmcorresponding to the condition of the edge directional information,determined in the step of (b).
 2. The color interpolation method ofclaim 1, wherein the edge directional information comprises edgevertical directional information and edge horizontal directionalinformation.
 3. The color interpolation method of claim 2, whereindelta_V1 and delta_V2 are computed by the following formulas,respectively, and $\begin{matrix}{{{{delta\_ V}\; 1} = \frac{\left( {{{{P\; 5} - {P\; 1}}} + {{{P\; 5} - {P\; 9}}}} \right)}{2}}\; {{{delta\_ V}\; 2} = \frac{\left( {{{{P\; 2} - {P\; 7}}} + {{{P\; 3} - {P\; 8}}}} \right)}{2}}} & \;\end{matrix}$ the vertical directional information V_comp is computed bythe following formula using the delta_V1 and delta_V2, the P1, P2, P3,P5, P8 and P9 being pixel values in a Bayer pattern image regardless ofR, G and B components.V_comp=delta_(—) V1+delta_(—) V2
 4. The color interpolation method ofclaim 3, wherein delta_H1 and delta_H2 are computed by the followingformulas, respectively, and $\begin{matrix}{{{delta\_}\; H\; 1} = \frac{\left( {{{{P\; 5} - {P\; 4}}} + {{{P\; 5} - {P\; 6}}}} \right)}{2}} \\{{{delta\_}\; H\; 2} = \frac{\left( {{{{P\; 2} - {P\; 3}}} + {{{P\; 7} - {P\; 8}}}} \right)}{2}}\end{matrix}$ the vertical directional information H_comp is computed bythe following formula using the delta_H1 and delta_H2, the P1, P2, P3,P5, P8 and P9 being pixel values in a Bayer pattern image regardless ofR, G and B components.H_comp=delta_(—) H1+delta_(—) H2
 5. The color interpolation method ofclaim 2, wherein the plurality of predetermined conditions comprises: afirst condition, in which the vertical directional information is largerthan a first threshold and the horizontal directional information islarger than a second threshold; a second condition, in which thevertical directional information is larger than the horizontaldirectional information; and a third condition, satisfying neither thefirst condition nor the second condition.
 6. The color interpolationmethod of claim 5, wherein if the computed edge directional informationsatisfies the first condition and an R component is a center pixel in anRG line of the Bayer pattern image, parameters Gwn, Gws, Ges, Gen andGout are computed by the following formulas in the step of (c):$\begin{matrix}{{Gwn} = \frac{\left( {{G\; 1} + {G\; 3} + {G\; 6} + {G\; 4}} \right)}{4}} \\{{Gws} = \frac{\left( {{G\; 6} + {G\; 8} + {G\; 11} + {G\; 9}} \right)}{4}} \\{{Ges} = \frac{\left( {{G\; 7} + {G\; 9} + {G\; 12} + {G\; 10}} \right)}{4}} \\{{Gen} = \frac{\left( {{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}} \right)}{4}} \\{{Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 1} + {{Kr}\; 2} + {{Kr}\; 3} + {{Kr}\; 4}} \right)}{4}}}\end{matrix}$
 7. The color interpolation method of claim 5, wherein ifthe computed edge directional information satisfies the first conditionand a G component is a center pixel in an GB line of the Bayer patternimage, parameters Gn, Gw, Gs and Ge are computed by the followingformulas in the step of (c): $\begin{matrix}{{Gn} = \frac{\left( {{G\; 1} + {G\; 2} + {G\; 5} + {G\; 3}} \right)}{4}} \\{{Gw} = \frac{\left( {{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}} \right)}{4}} \\{{Gs} = \frac{\left( {{G\; 5} + {G\; 7} + {G\; 9} + {G\; 8}} \right)}{4}} \\{{Ge} = \frac{\left( {{G\; 3} + {G\; 5} + {G\; 8} + {G\; 6}} \right)}{4}}\end{matrix}$
 8. The color interpolation method of claim 5, wherein ifthe computed edge directional information satisfies the second conditionand an R component is a center pixel in an RG line of the Bayer patternimage, parameters Gwn, Gws, Ges, Gen and Gout are computed by thefollowing formulas in the step of (c): $\begin{matrix}{{Gwn} = \frac{\left( {{G\; 3} + {G\; 4}} \right)}{2}} \\{{Gws} = \frac{\left( {{G\; 8} + {G\; 9}} \right)}{2}} \\{{Ges} = \frac{\left( {{G\; 9} + {G\; 10}} \right)}{2}} \\{{Gen} = \frac{\left( {{G\; 4} + {G\; 5}} \right)}{2}} \\{{Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 2} + {{Kr}\; 4}} \right)}{2}}}\end{matrix}$
 9. The color interpolation method of claim 5, wherein ifthe computed edge directional information satisfies the second conditionand a G component is a center pixel in an GB line of the Bayer patternimage, parameters Gn, Gw, Gs and Ge are computed by the followingformulas in the step of (c): $\begin{matrix}{{Gn} = \frac{\left( {{G\; 2} + {G\; 3}} \right)}{2}} \\{{Gw} = \frac{\left( {{G\; 4} + {G\; 5}} \right)}{2}} \\{{Gs} = \frac{\left( {{G\; 7} + {G\; 8}} \right)}{2}} \\{{Ge} = \frac{\left( {{G\; 5} + {G\; 6}} \right)}{2}}\end{matrix}$
 10. The color interpolation method of claim 5, wherein ifthe computed edge directional information satisfies the third conditionand an R component is a center pixel in an RG line of the Bayer patternimage, parameters Gwn, Gws, Ges, Gen and Gout are computed by thefollowing formulas in the step of (c): $\begin{matrix}{{Gwn} = \frac{\left( {{G\; 1} + {G\; 6}} \right)}{2}} \\{{Gws} = \frac{\left( {{G\; 6} + {G\; 11}} \right)}{2}} \\{{Ges} = \frac{\left( {{G\; 7} + {G\; 12}} \right)}{2}} \\{{Gen} = \frac{\left( {{G\; 2} + {G\; 7}} \right)}{2}} \\{{Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 1} + {{Kr}\; 3}} \right)}{2}}}\end{matrix}$
 11. The color interpolation method of claim 5, wherein ifthe computed edge directional information satisfies the third conditionand an G component is a center pixel in an GB line of the Bayer patternimage, parameters Gn, Gw, Gs and Ge are computed by the followingformulas in the step of (c): $\begin{matrix}{{Gn} = \frac{\left( {{G\; 1} + {G\; 5}} \right)}{2}} \\{{Gw} = \frac{\left( {{G\; 2} + {G\; 7}} \right)}{2}} \\{{Gs} = \frac{\left( {{G\; 5} + {G\; 9}} \right)}{2}} \\{{Ge} = \frac{\left( {{G\; 3} + {G\; 8}} \right)}{2}}\end{matrix}$
 12. A color interpolation device, comprising: an edgedirectional information computing unit, extracting a pixel value onlyfrom a Bayer pattern image regardless of R, G and B values and computingedge directional information; an edge directional information conditiondetermining unit, determining a condition of the edge directionalinformation, outputted from the edge directional information computingunit, among a plurality of predetermined conditions, each of theplurality of predetermined conditions corresponding to a colorinterpolation parameter computing algorithm; and a parameter computingunit, computing a color interpolation parameter based on the colorinterpolation parameter computing algorithm corresponding to thecondition of the edge directional information, determined by the edgedirectional information condition determining unit.
 13. The colorinterpolation device of claim 12, wherein the edge directionalinformation computing unit comprises a horizontal directionalinformation computing unit, computing edge horizontal directionalinformation, and a vertical directional information computing unit,computing edge vertical directional information.
 14. The colorinterpolation device of claim 13, wherein delta_V1 and delta_V2 arecomputed by the following formulas, respectively, and $\begin{matrix}{{{delta\_}\; V\; 1} = \frac{\left( {{{{P\; 5} - {P\; 1}}} + {{{P\; 5} - {P\; 9}}}} \right)}{2}} \\{{{delta\_}\; V\; 2} = \frac{\left( {{{{P\; 2} - {P\; 7}}} + {{{P\; 3} - {P\; 8}}}} \right)}{2}}\end{matrix}$ the vertical directional information V_comp is computed bythe following formula using the delta_V1 and delta_V2, the P1, P2, P3,P5, P8 and P9 being pixel values in a Bayer pattern image regardless ofR, G and B components.V_comp=delta_(—) V1+delta_(—) V2
 15. The color interpolation device ofclaim 13, wherein delta_H1 and delta_H2 are computed by the followingformulas, respectively, and $\begin{matrix}{{{delta\_}\; H\; 1} = \frac{\left( {{{{P\; 5} - {P\; 4}}} + {{{P\; 5} - {P\; 6}}}} \right)}{2}} \\{{{delta\_}\; H\; 2} = \frac{\left( {{{{P\; 2} - {P\; 3}}} + {{{P\; 7} - {P\; 8}}}} \right)}{2}}\end{matrix}$ the vertical directional information H_comp is computed bythe following formula using the delta_H1 and delta_H2, the P1, P2, P3,P5, P8 and P9 being pixel values in a Bayer pattern image regardless ofR, G and B components.H_comp=delta_(—) H1+delta_(—) H2
 16. The color interpolation device ofclaim 13, wherein the plurality of predetermined conditions comprises: afirst condition, in which the vertical directional information is largerthan a first threshold and the horizontal directional information islarger than a second threshold; a second condition, in which thevertical directional information is larger than the horizontaldirectional information; and a third condition, satisfying neither thefirst condition nor the second condition, and the parameter computingunit comprises: a first condition parameter computing unit, computing aparameter based on a color interpolation parameter computing algorithmrelating to the first condition; a second condition parameter computingunit, computing a parameter based on a color interpolation parametercomputing algorithm relating to the second condition; and a thirdcondition parameter computing unit, computing a parameter based on acolor interpolation parameter computing algorithm relating to the thirdcondition.
 17. The color interpolation device of claim 16 wherein if thecomputed edge directional information satisfies the first condition andan R component is a center pixel in an RG line of the Bayer patternimage, parameters Gwn, Gws, Ges, Gen and Gout are computed by thefollowing formulas in the step of (c): $\begin{matrix}{{Gwn} = \frac{\left( {{G\; 1} + {G\; 3} + {G\; 6} + {G\; 4}} \right)}{4}} \\{{Gws} = \frac{\left( {{G\; 6} + {G\; 8} + {G\; 11} + {G\; 9}} \right)}{4}} \\{{Ges} = \frac{\left( {{G\; 7} + {G\; 9} + {G\; 12} + {G\; 10}} \right)}{4}} \\{{Gen} = \frac{\left( {{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}} \right)}{4}} \\{{Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 1} + {{Kr}\; 2} + {{Kr}\; 3} + {{Kr}\; 4}} \right)}{4}}}\end{matrix}$
 18. The color interpolation device of claim 16 wherein ifthe computed edge directional information satisfies the first conditionand a G component is a center pixel in an GB line of the Bayer patternimage, parameters Gn, Gw, Gs and Ge are computed by the followingformulas in the step of (c): $\begin{matrix}{{Gn} = \frac{\left( {{G\; 1} + {G\; 2} + {G\; 5} + {G\; 3}} \right)}{4}} \\{{Gw} = \frac{\left( {{G\; 2} + {G\; 4} + {G\; 7} + {G\; 5}} \right)}{4}} \\{{Gs} = \frac{\left( {{G\; 5} + {G\; 7} + {G\; 9} + {G\; 8}} \right)}{4}} \\{{Ge} = \frac{\left( {{G\; 3} + {G\; 5} + {G\; 8} + {G\; 6}} \right)}{4}}\end{matrix}$
 19. The color interpolation device of claim 16 wherein ifthe computed edge directional information satisfies the second conditionand an R component is a center pixel in an RG line of the Bayer patternimage, parameters Gwn, Gws, Ges, Gen and Gout are computed by thefollowing formulas in the step of (c): $\begin{matrix}{{Gwn} = \frac{\left( {{G\; 3} + {G\; 4}} \right)}{2}} \\{{Gws} = \frac{\left( {{G\; 8} + {G\; 9}} \right)}{2}} \\{{Ges} = \frac{\left( {{G\; 9} + {G\; 10}} \right)}{2}} \\{{Gen} = \frac{\left( {{G\; 4} + {G\; 5}} \right)}{2}} \\{{Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 2} + {{Kr}\; 4}} \right)}{2}}}\end{matrix}$
 20. The color interpolation device of claim 16 wherein ifthe computed edge directional information satisfies the second conditionand a G component is a center pixel in an GB line of the Bayer patternimage, parameters Gn, Gw, Gs and Ge are computed by the followingformulas in the step of (c): $\begin{matrix}{{Gn} = \frac{\left( {{G\; 2} + {G\; 3}} \right)}{2}} \\{{Gw} = \frac{\left( {{G\; 4} + {G\; 5}} \right)}{2}} \\{{Gs} = \frac{\left( {{G\; 7} + {G\; 8}} \right)}{2}} \\{{Ge} = \frac{\left( {{G\; 5} + {G\; 6}} \right)}{2}}\end{matrix}$
 21. The color interpolation device of claim 16 wherein ifthe computed edge directional information satisfies the third conditionand an R component is a center pixel in an RG line of the Bayer patternimage, parameters Gwn, Gws, Ges, Gen and Gout are computed by thefollowing formulas in the step of (c): $\begin{matrix}{{Gwn} = \frac{\left( {{G\; 1} + {G\; 6}} \right)}{2}} \\{{Gws} = \frac{\left( {{G\; 6} + {G\; 11}} \right)}{2}} \\{{Ges} = \frac{\left( {{G\; 7} + {G\; 12}} \right)}{2}} \\{{Gen} = \frac{\left( {{G\; 2} + {G\; 7}} \right)}{2}} \\{{Gout} = {{R\; 3} + \frac{\left( {{{Kr}\; 1} + {{Kr}\; 3}} \right)}{2}}}\end{matrix}$
 22. The color interpolation device of claim 16 wherein thecomputed edge directional information satisfies the third condition andan G component is a center pixel in an GB line of the Bayer patternimage, parameters Gn, Gw, Gs and Ge are computed by the followingformulas in the step of (c): $\begin{matrix}{{Gn} = \frac{\left( {{G\; 1} + {G\; 5}} \right)}{2}} \\{{Gw} = \frac{\left( {{G\; 2} + {G\; 7}} \right)}{2}} \\{{Gs} = \frac{\left( {{G\; 5} + {G\; 9}} \right)}{2}} \\{{Ge} = \frac{\left( {{G\; 3} + {G\; 8}} \right)}{2}}\end{matrix}$